package com.fernandomartines.dbcheck.sql;

import java.util.Date;

public enum SQLType {

    INT         ("INT", Integer.class),
    INTEGER     ("INTEGER", Integer.class),
    FLOAT       ("FLOAT", Float.class),
    DECIMAL     ("DECIMAL", Float.class),
    DATE        ("DATE", Date.class),
    DATETIME    ("DATETIME", Date.class),
    TIMESTAMP   ("TIMESTAMP", Date.class),
    CHAR        ("CHAR", String.class),
    VARCHAR     ("VARCHAR", String.class),
    NULL        ("NULL", Object.class);

    private String typeName;
    private Class  javaClass;

    SQLType(String typeName, Class javaClass) {
        this.typeName  = typeName;
        this.javaClass = javaClass;
    }

    public static SQLType getSQLTypeByName(String name) {
        return NULL.valueOf(name);
    }

}
